using System;
using System.Threading.Tasks;

namespace Runtime.DesignPattern
{
    public interface IEventHandler
    {
        string HandlerId { get; }
        bool CanHandle(IEvent @event);
        Task HandleEventAsync(IEvent @event);
    }

    public interface IEventHandler<TData> : IEventHandler
    {
        bool CanHandle(IEvent<TData> @event);
        Task HandleEventAsync(IEvent<TData> @event);
    }
}